home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / ALTD201A.ZIP / VB4032.ZIP / VB40.32 / EX25VB.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-19  |  5.1 KB  |  169 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "VB Example 25"
  4.    ClientHeight    =   4380
  5.    ClientLeft      =   1740
  6.    ClientTop       =   1320
  7.    ClientWidth     =   6225
  8.    Height          =   4785
  9.    Left            =   1680
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4380
  12.    ScaleWidth      =   6225
  13.    Top             =   975
  14.    Width           =   6345
  15.    Begin VB.CommandButton About 
  16.       Caption         =   "About"
  17.       Height          =   495
  18.       Left            =   1800
  19.       TabIndex        =   10
  20.       Top             =   2280
  21.       Width           =   975
  22.    End
  23.    Begin VB.OptionButton TrackJob 
  24.       Caption         =   "Track Job"
  25.       Height          =   375
  26.       Left            =   4560
  27.       TabIndex        =   9
  28.       Top             =   2640
  29.       Width           =   1095
  30.    End
  31.    Begin VB.OptionButton TrackObjects 
  32.       Caption         =   "Track Objects"
  33.       Height          =   375
  34.       Left            =   4560
  35.       TabIndex        =   8
  36.       Top             =   2280
  37.       Value           =   -1  'True
  38.       Width           =   1455
  39.    End
  40.    Begin VB.TextBox Progress 
  41.       Height          =   495
  42.       Left            =   2040
  43.       TabIndex        =   6
  44.       Text            =   "Progress - Invisible"
  45.       Top             =   3360
  46.       Visible         =   0   'False
  47.       Width           =   1455
  48.    End
  49.    Begin VB.TextBox Filename 
  50.       Height          =   495
  51.       Left            =   1080
  52.       TabIndex        =   5
  53.       Text            =   "File Name"
  54.       Top             =   3000
  55.       Width           =   3135
  56.    End
  57.    Begin VB.CommandButton Exit 
  58.       Caption         =   "Exit"
  59.       Height          =   495
  60.       Left            =   3000
  61.       TabIndex        =   4
  62.       Top             =   2280
  63.       Width           =   975
  64.    End
  65.    Begin VB.CommandButton AppendFiles 
  66.       Caption         =   "Append Files"
  67.       Height          =   495
  68.       Left            =   360
  69.       TabIndex        =   3
  70.       Top             =   2280
  71.       Width           =   1215
  72.    End
  73.    Begin VB.FileListBox File2 
  74.       Height          =   1815
  75.       Left            =   3600
  76.       MultiSelect     =   2  'Extended
  77.       TabIndex        =   2
  78.       Top             =   240
  79.       Width           =   1335
  80.    End
  81.    Begin VB.ListBox List1 
  82.       Height          =   1815
  83.       Left            =   1920
  84.       TabIndex        =   1
  85.       Top             =   240
  86.       Width           =   1455
  87.    End
  88.    Begin VB.FileListBox File1 
  89.       Height          =   1815
  90.       Left            =   360
  91.       Pattern         =   "*.zip"
  92.       TabIndex        =   0
  93.       Top             =   240
  94.       Width           =   1335
  95.    End
  96.    Begin Threed.SSPanel SSPanel1 
  97.       Height          =   495
  98.       Left            =   1080
  99.       TabIndex        =   7
  100.       Top             =   3600
  101.       Width           =   3135
  102.       _Version        =   65536
  103.       _ExtentX        =   5530
  104.       _ExtentY        =   873
  105.       _StockProps     =   15
  106.       Caption         =   "SSPanel1"
  107.       BackColor       =   12632256
  108.       FloodType       =   1
  109.    End
  110. Attribute VB_Name = "Form1"
  111. Attribute VB_Creatable = False
  112. Attribute VB_Exposed = False
  113. Dim LibraryHandle As Long
  114. Private Sub About_Click()
  115.   frmAbout.Text1 = "EX25VB demonstrates the simplified interface.  Double click on a"
  116.   frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents.  You can append files to the archive."
  117.   frmAbout.Text1 = frmAbout.Text1 + " The Track Objects button will allow you to see the progress on each"
  118.   frmAbout.Text1 = frmAbout.Text1 + " individual file as it is added.  The Track Job button will show the"
  119.   frmAbout.Text1 = frmAbout.Text1 + " progress of the entire job."
  120.   frmAbout.Show 1
  121. End Sub
  122. Private Sub AppendFiles_Click()
  123.     Dim i As Long
  124.     Dim files As String
  125.     files = ""
  126.     For i = 0 To File2.ListCount - 1
  127.         If File2.Selected(i) Then
  128.             files = files + " " + File2.List(i)
  129.         End If
  130.     Next i
  131.     If TrackObjects.Value = True Then
  132.         i = ALAppend(File1.FileName, files, 0, FileName.hWnd, Progress.hWnd, 0)
  133.     Else
  134.         i = ALAppend(File1.FileName, files, 0, FileName.hWnd, 0, Progress.hWnd)
  135.     End If
  136.     File1_DblClick
  137. End Sub
  138. Private Sub Exit_Click()
  139.   Unload Form1
  140.   End
  141. End Sub
  142. Private Sub File1_DblClick()
  143.     Dim z() As ALZipDir
  144.     Dim count As Long
  145.     Dim status As Long
  146.     If File1.FileName <> "" Then
  147.         ALReadDir z(), File1.FileName, count, status
  148.         List1.Clear
  149.         i = 0
  150.         While z(i).size <> -1
  151.           List1.AddItem z(i).name
  152.           i = i + 1
  153.         Wend
  154.     End If
  155. End Sub
  156. Private Sub Form_Load()
  157.     ChDrive App.Path
  158.     ChDir App.Path
  159.     File1.Path = App.Path
  160.     LibraryHandle = LoadLibrary(DLLName)
  161.     If LibraryHandle = 0 Then FileName.text = "***Error loading " + DLLName + "***"
  162. End Sub
  163. Private Sub Form_Unload(Cancel As Integer)
  164.   FreeLibrary (LibraryHandle)
  165. End Sub
  166. Private Sub Progress_Change()
  167.   SSPanel1.FloodPercent = Val(Progress.text)
  168. End Sub
  169.